<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/10
 * Time: 15:09
 */
namespace Admin\Model;
use Base\Model\BaseModel;

class InspectiondetailinfoModel extends BaseModel
{
    protected $_validate = array(
        array('refvalue', 'require', '检查项参考值必须填写'),
//        array('refvalue','/^[0-9_\,\-]+$/', '检查项参考值不符合规则！',2),
    );
    protected $_auto = array(
        array('defaultselect', '0'),
        array('status','1')
    );
    protected $_link=array(
//        'Inspectioninfo' => array(
//            'mapping_type' => self::BELONGS_TO,
//            'class_name'    => 'Inspectioninfo',
//            'foreign_key' => 'medicalid',
//            'parent_key' => 'id',
//            'mapping_fields' => 'id,name'
//        ),
        'Inspectioniteminfo' => array(
            'mapping_type' => self::BELONGS_TO,
            'class_name'    => 'Inspectioniteminfo',
            'foreign_key' => 'itemid',
            'parent_key' => 'id',
        ),
    );


}